<?php namespace system\middleware;

use houdunwang\middleware\build\Middleware;
use houdunwang\session\Session;


class Auth implements Middleware{
	//执行中间件
	public function run($next) {


		//执行登录
		 if (!Session::get('admin.admin_id'))
		 {
		 	//获取不到admin ——id  所以跳转到 登录页

			 go('admin.login.index');
		 }
         $next();
	}
}